package com.twu.biblioteca;

import com.google.inject.Guice;
import com.google.inject.Injector;

import com.twu.biblioteca.controller.BookController;
import com.twu.biblioteca.controller.MovieController;
import com.twu.biblioteca.controller.UserController;
import com.twu.biblioteca.di.BibliotecaModule;
import com.twu.biblioteca.view.console.ConsoleViewController;

public class BibliotecaApp {

    public static void main(String[] args) {
      Injector injector = Guice.createInjector(new BibliotecaModule());
      ConsoleViewController viewController = injector.getInstance(ConsoleViewController.class);
      BookController bookController = injector.getInstance(BookController.class);
      UserController userController = injector.getInstance(UserController.class);
      MovieController movieController = injector.getInstance(MovieController.class);
      bookController.register(viewController);
      userController.register(viewController);
      movieController.register(viewController);
      viewController.start();
    }
}
